/* eslint-disable */
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import axios from 'axios'

const app = createApp(App)

const baseURL = import.meta.env.VITE_API_BASE_URL || 'http://www.dolmo.top:8888/api'
const imgServer = import.meta.env.VITE_IMG_SERVER || 'http://www.dolmo.top:8888/api/img'

const http = axios.create({
  baseURL,
  timeout: 5000
})

// 全局属性挂载方式变更
app.config.globalProperties.$http = http
app.config.globalProperties.imgServer = `${imgServer}/name/resized_`
app.config.globalProperties.uploadImg = `${imgServer}/upload`

app.use(router)

app.use(ElementPlus)
app.mount('#app')